package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;

import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);


    List<Employee> selectForList(EmployeeQueryObject qo);

    void insertRelation(@Param("eid") Long eid, @Param("rid") Long rid);

    void insertBatchRelation(@Param("id") Long id, @Param("ids") Long[] ids);

    void deleteEmployeeBindRole(Long id);

    Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    void updateByUsernameAndPassword(@Param("id") Long id, @Param("password") String password);

    void deleteCheckedList(Long[] ids);

    Employee selectByUsername(String name);
}